<template>

    <div>
        <div class="mobile">id：{{detail.id}}</div>
        <div class="mobile">客户头像：<br><img :src="detail.avatar_cdn" alt="" style="margin:.5rem 0 .5rem 1rem;width:5rem;height:5rem;"></div>
        <div class="mobile">客户名称：{{detail.nickname}}</div>
        <div class="mobile">客户电话：{{detail.mobile}}</div>
        <div class="mobile">邮箱：{{detail.email}}</div>
        <div class="mobile">剩余金额：{{detail.money}}</div>
        <div class="mobile">性别：{{detail.sex_text}}</div>
        <div class="mobile">客户来源：{{detail.source.name}}</div>
        <div class="mobile">成交状态：{{detail.deal_text}}</div>
        <div class="mobile">认证状态：{{detail.auth_text}}</div>
    </div>

</template>

<script>
export default {
    data() {
        return {
            id:0,
            detail:{},
            LoginAdmin:uni.getStorageSync('LoginAdmin') ? uni.getStorageSync('LoginAdmin') : {},
        }
    },
    onReady() {
		// 如果需要兼容微信小程序，并且校验规则中含有方法等，只能通过setRules方法设置规则。
    	// this.$refs.uForm.setRules(this.rules)
    },
    onLoad(options)
    {
        this.id = options.id;
        this.getDetail();
        // console.log(this.id);
    },
    methods: {
  

        async getDetail()
        {
            let data = {
                    adminid:this.LoginAdmin.id,
                    
                    id:this.id
            }
            let result = await this.$u.api.manage.PrivateseaDetail(data);
            // console.log(result.data);
            this.detail = result.data;
            // if(this.detail.gender == 0){
            //     this.detail.gender = '保密';
            // }else if(this.detail.gender == 1){
            //     this.detail.gender = '男';
            // }else if(this.detail.gender == 2){
            //     this.detail.gender = '女';
            // };

            // if(this.detail.deal == 0){
            //     this.detail.deal = '未成交';
            // }else if(this.detail.deal == 1){
            //     this.detail.deal = '已成交';
            // };

            // if(this.detail.auth == 0){
            //     this.detail.auth = '未认证';
            // }else if(this.detail.auth == 1){
            //     this.detail.auth = '已认证';
            // };

            if(this.detail.email == null){
                this.detail.email = '-';
            }

        },

    },
    onShow()
    {
        
        // console.log(this.id);
    },
}
</script>


<style>


.mobile{
    font-size: .8rem;
    color: gray;
    border-bottom: 2px solid rgb(170, 169, 169);
    margin-bottom: .5rem;
}

</style>